# To change this template, choose Tools | Templates
# and open the template in the editor.

# Test 1
puts "Hello World"

# Exercice 1
temp = 0
for i in 1...1000 do
  if i % 3 == 0
    temp = temp + i
  elsif i % 5 == 0
    temp = temp + i
  end
end
puts temp

# Exercice 2
def celcius_to_farenheit (val)
 1.8 * val + 32
end

def farenheit_to_celcius (val)
result = (5 / 9 * val) - (160 / 9)
  return result
end

puts celcius_to_farenheit(gets.chomp.to_f)

puts farenheit_to_celcius(gets.chomp.to_f)

import main.rb